import java.util.Random;
import java.util.Scanner;

public class demo07 {
    public static void main(String[] args) {
        Random rd=new Random();
        int i=rd.nextInt(10);
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入一个0-9的数");
        int j=sc.nextInt();

        while (j>=0&&j<=9){
            if (j>i){
                System.out.println("太大");
                j=sc.nextInt();
            }else if (j<i){
                System.out.println("太小");
                j=sc.nextInt();
            }else{
                System.out.println("恭喜你答对了");
                break;
            }
        }

    }
}
